"""
__author__ = 'berlinyoung'
@File   :managelist_page.py
@Date   :2021/10/8 21:53
-*- coding: utf-8 -*-
"""
from appium.webdriver.common.mobileby import MobileBy

from test_app.test_po5.page.base_page import BasePage


class ManageListPage(BasePage):

    edit_member_button=(MobileBy.XPATH,"//*[@resource-id='com.tencent.wework:id/h7y']")
    del_member_button=(MobileBy.ANDROID_UIAUTOMATOR,'new UiScrollable(new UiSelector().'
                                                        'scrollable(true).instance(0)).'
                                                        f'scrollIntoView(new UiSelector().text("删除成员")'
                                                        '.instance(0));')
    conform_del_button=(MobileBy.XPATH,"//*[@text='确定']")

    def del_member(self):
        self.find_and_click(*self.edit_member_button)
        self.find_and_click(*self.del_member_button)
        self.find_and_click(*self.conform_del_button)